with communautes_strings;
with communautes_strings_implementation_sigma;
with communautes_strings_implementation_optimaletemps;
with Ada.Text_IO;
function Configuration return communautes_strings.communaute'Class is
   type choix is (Sigma,Optimale);
   c: choix;
begin
   Ada.Text_IO.Put_Line("Choisissez votre implementation");
   Ada.Text_IO.Put_Line("Sigma ou Optimale");
   loop
      BEGIN
   c:= choix'Value(Ada.Text_IO.Get_Line);

   case c is
      when Sigma =>
         return communautes_strings_implementation_sigma.creer;
      when optimale =>
         return communautes_strings_implementation_optimaletemps.creer;
         end case;
      Exception
         when Constraint_Error=> Ada.Text_IO.Put_Line("Choix d'implementation non valide");
         when others => Ada.Text_IO.Put_Line("Une erreur incongrue est survenue.");
      END;

      end loop;

end Configuration;
